package com.fcg.redis.orgtree.bean;

import lombok.Data;

/**
 * @author FCG
 */
@Data
public class Employee {
    private String unitCode;
    private String unitName;
    private String companyCode;
    private String companyName;
    private String departCode;
    private String departName;
    private String employeeCode;
    private String employeeName;

    public static Employee of(String unitCode, String unitName, String companyCode, String companyName, String departCode,
                              String departName, String employeeCode, String employeeName) {
        Employee employee = new Employee();
        employee.unitCode = unitCode;
        employee.unitName = unitName;
        employee.companyCode = companyCode;
        employee.companyName = companyName;
        employee.departCode = departCode;
        employee.departName = departName;
        employee.employeeCode = employeeCode;
        employee.employeeName = employeeName;
        return employee;
    }

    @Override
    public String toString() {
        return unitCode + '|' +
                unitName + '|' +
                companyCode + '|' +
                companyName + '|' +
                departCode + '|' +
                departName + '|' +
                employeeCode + '|' +
                employeeName + '|';
    }
}
